import React, { Component } from 'react';
import './index.css'
import Top from '../../components/Top'
import Boy from '../../components/Boy'
import Girl from '../../components/Girl'
import axios from 'axios';
class Class extends Component {
  state = {
     man:[],
     woman:[]
  }
  render() {
    return (
      <div>
         <Top name={'分类'}/>
         <Boy man={this.state.man}/>
         <Girl woman={this.state.woman}/>
      </div>
    );
  }
  componentDidMount(){
    
    this.setState({
        title:this.props.match.params.fenlei
    })
    this.getManData()

  }
  getManData(){
    axios({
      method:'GET',
      url:'https://wxapi.chuangbie.com/wap/book/bookStack'
    }).then(res =>{
      this.setState({
        man:res.data.data.man,
        woman:res.data.data.woman
      })
    })
  }

}

export default Class;